/*
 *  This file is part of the SIRIUS libraries for analyzing MS and MS/MS data
 *
 *  Copyright (C) 2024 Bright Giant GmbH
 *
 *  This library is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU Lesser General Public
 *  License as published by the Free Software Foundation; either
 *  version 2.1 of the License, or (at your option) any later version.
 *
 *  This library is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *  Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License along with SIRIUS.  If not, see <http://www.gnu.org/licenses/>.
 *
 *  NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 *  https://openapi-generator.tech
 *  Do not edit the class manually.
 */


package io.sirius.ms.sdk.model;

import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import io.sirius.ms.sdk.model.ValueType;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;

/**
 * TagDefinition
 */
@JsonPropertyOrder({
  TagDefinition.JSON_PROPERTY_TAG_NAME,
  TagDefinition.JSON_PROPERTY_DESCRIPTION,
  TagDefinition.JSON_PROPERTY_TAG_TYPE,
  TagDefinition.JSON_PROPERTY_VALUE_TYPE,
  TagDefinition.JSON_PROPERTY_POSSIBLE_VALUES,
  TagDefinition.JSON_PROPERTY_MIN_VALUE,
  TagDefinition.JSON_PROPERTY_MAX_VALUE,
  TagDefinition.JSON_PROPERTY_EDITABLE
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.14.0")
public class TagDefinition {
  public static final String JSON_PROPERTY_TAG_NAME = "tagName";
  @jakarta.annotation.Nonnull
  private String tagName;

  public static final String JSON_PROPERTY_DESCRIPTION = "description";
  @jakarta.annotation.Nullable
  private String description;

  public static final String JSON_PROPERTY_TAG_TYPE = "tagType";
  @jakarta.annotation.Nullable
  private String tagType;

  public static final String JSON_PROPERTY_VALUE_TYPE = "valueType";
  @jakarta.annotation.Nonnull
  private ValueType valueType;

  public static final String JSON_PROPERTY_POSSIBLE_VALUES = "possibleValues";
  @jakarta.annotation.Nullable
  private List<Object> possibleValues;

  public static final String JSON_PROPERTY_MIN_VALUE = "minValue";
  @jakarta.annotation.Nullable
  private Object minValue;

  public static final String JSON_PROPERTY_MAX_VALUE = "maxValue";
  @jakarta.annotation.Nullable
  private Object maxValue;

  public static final String JSON_PROPERTY_EDITABLE = "editable";
  @jakarta.annotation.Nullable
  private Boolean editable;

  public TagDefinition() {
  }

  public TagDefinition tagName(@jakarta.annotation.Nonnull String tagName) {
    
    this.tagName = tagName;
    return this;
  }

  /**
   * Name of this tag defined by this definition (key)
   * @return tagName
   */
  @jakarta.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_TAG_NAME)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public String getTagName() {
    return tagName;
  }


  @JsonProperty(JSON_PROPERTY_TAG_NAME)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setTagName(@jakarta.annotation.Nonnull String tagName) {
    this.tagName = tagName;
  }

  public TagDefinition description(@jakarta.annotation.Nullable String description) {
    
    this.description = description;
    return this;
  }

  /**
   * A human-readable description about the purpose of this tag.
   * @return description
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_DESCRIPTION)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getDescription() {
    return description;
  }


  @JsonProperty(JSON_PROPERTY_DESCRIPTION)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setDescription(@jakarta.annotation.Nullable String description) {
    this.description = description;
  }

  public TagDefinition tagType(@jakarta.annotation.Nullable String tagType) {
    
    this.tagType = tagType;
    return this;
  }

  /**
   * A simple string based identifier to specify the type/scope/purpose of this tag.
   * @return tagType
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_TAG_TYPE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getTagType() {
    return tagType;
  }


  @JsonProperty(JSON_PROPERTY_TAG_TYPE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setTagType(@jakarta.annotation.Nullable String tagType) {
    this.tagType = tagType;
  }

  public TagDefinition valueType(@jakarta.annotation.Nonnull ValueType valueType) {
    
    this.valueType = valueType;
    return this;
  }

  /**
   * Get valueType
   * @return valueType
   */
  @jakarta.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_VALUE_TYPE)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public ValueType getValueType() {
    return valueType;
  }


  @JsonProperty(JSON_PROPERTY_VALUE_TYPE)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setValueType(@jakarta.annotation.Nonnull ValueType valueType) {
    this.valueType = valueType;
  }

  public TagDefinition possibleValues(@jakarta.annotation.Nullable List<Object> possibleValues) {
    
    this.possibleValues = possibleValues;
    return this;
  }

  public TagDefinition addPossibleValuesItem(Object possibleValuesItem) {
    if (this.possibleValues == null) {
      this.possibleValues = new ArrayList<>();
    }
    this.possibleValues.add(possibleValuesItem);
    return this;
  }

  /**
   * Get possibleValues
   * @return possibleValues
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_POSSIBLE_VALUES)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public List<Object> getPossibleValues() {
    return possibleValues;
  }


  @JsonProperty(JSON_PROPERTY_POSSIBLE_VALUES)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setPossibleValues(@jakarta.annotation.Nullable List<Object> possibleValues) {
    this.possibleValues = possibleValues;
  }

  public TagDefinition minValue(@jakarta.annotation.Nullable Object minValue) {
    
    this.minValue = minValue;
    return this;
  }

  /**
   * Get minValue
   * @return minValue
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_MIN_VALUE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Object getMinValue() {
    return minValue;
  }


  @JsonProperty(JSON_PROPERTY_MIN_VALUE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setMinValue(@jakarta.annotation.Nullable Object minValue) {
    this.minValue = minValue;
  }

  public TagDefinition maxValue(@jakarta.annotation.Nullable Object maxValue) {
    
    this.maxValue = maxValue;
    return this;
  }

  /**
   * Get maxValue
   * @return maxValue
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_MAX_VALUE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Object getMaxValue() {
    return maxValue;
  }


  @JsonProperty(JSON_PROPERTY_MAX_VALUE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setMaxValue(@jakarta.annotation.Nullable Object maxValue) {
    this.maxValue = maxValue;
  }

  public TagDefinition editable(@jakarta.annotation.Nullable Boolean editable) {
    
    this.editable = editable;
    return this;
  }

  /**
   * Get editable
   * @return editable
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_EDITABLE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Boolean isEditable() {
    return editable;
  }


  @JsonProperty(JSON_PROPERTY_EDITABLE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setEditable(@jakarta.annotation.Nullable Boolean editable) {
    this.editable = editable;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    TagDefinition tagDefinition = (TagDefinition) o;
    return Objects.equals(this.tagName, tagDefinition.tagName) &&
        Objects.equals(this.description, tagDefinition.description) &&
        Objects.equals(this.tagType, tagDefinition.tagType) &&
        Objects.equals(this.valueType, tagDefinition.valueType) &&
        Objects.equals(this.possibleValues, tagDefinition.possibleValues) &&
        Objects.equals(this.minValue, tagDefinition.minValue) &&
        Objects.equals(this.maxValue, tagDefinition.maxValue) &&
        Objects.equals(this.editable, tagDefinition.editable);
  }

  @Override
  public int hashCode() {
    return Objects.hash(tagName, description, tagType, valueType, possibleValues, minValue, maxValue, editable);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class TagDefinition {\n");
    sb.append("    tagName: ").append(toIndentedString(tagName)).append("\n");
    sb.append("    description: ").append(toIndentedString(description)).append("\n");
    sb.append("    tagType: ").append(toIndentedString(tagType)).append("\n");
    sb.append("    valueType: ").append(toIndentedString(valueType)).append("\n");
    sb.append("    possibleValues: ").append(toIndentedString(possibleValues)).append("\n");
    sb.append("    minValue: ").append(toIndentedString(minValue)).append("\n");
    sb.append("    maxValue: ").append(toIndentedString(maxValue)).append("\n");
    sb.append("    editable: ").append(toIndentedString(editable)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}

